package com.coffee.admin.service.supplier.dao;

import com.coffee.admin.api.supplier.query.SupplierRolePermissionQuery;
import com.coffee.admin.service.supplier.bean.SupplierRolePermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SupplierRolePermissionDao {
	public SupplierRolePermission findById(Integer id);
	
	public SupplierRolePermission findByIdForUpdate(Integer id);
	
	public List<SupplierRolePermission> findByIds(@Param("idList") List<Integer> idList);

	public Integer count(@Param("param") SupplierRolePermissionQuery param);

	public List<SupplierRolePermission> page(@Param("param") SupplierRolePermissionQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

	public List<SupplierRolePermission> list(@Param("param") SupplierRolePermissionQuery param);

	public SupplierRolePermission findFirst(@Param("param") SupplierRolePermissionQuery param);

	public Integer insert(SupplierRolePermission param);

	Integer insertBatch(List<SupplierRolePermission> list);

	public void updateById(@Param("param") SupplierRolePermission param);
	
	public Integer deleteById(Integer id);
	
	public Integer deleteByIds(List<Integer> idList);

	public Integer deleteBySupplierRoleId(Integer roleId);

}